<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8" />
    <title>账单修复</title>
    <script th:src="@{/js/jquery.js}"></script>

</head>
<body>

<form name="billInfo">
    <table>
        <tr>
            <td>id:</td>
            <td><input type="text" id="id" name="id" /></td>
        </tr>
        <tr>
            <td>startcount2:</td>
            <td><input type="text" id="startcount2" name="startcount2" /></td>
        </tr>
        <tr>
            <td>endcount2:</td>
            <td><input type="text" id="endcount2" name="endcount2"/></td>
        </tr>
        <tr>
            <td>price2:</td>
            <td><input type="text" id="price2" name="price2" /></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" value="提交" onclick="return add()" />
            </td>
        </tr>
    </table>


</form>
</body>


<script type="text/javascript">
    function add(){
        var id = billInfo.id.value;
        var startcount2 = billInfo.startcount2.value;
        var endcount2 = billInfo.endcount2.value;
        var price2 = billInfo.price2.value;
        $(document).ready(function(){
            $.post("/repair",
                {"id":id,"startcount2":startcount2,"endcount2":endcount2,"price2":price2},
                function(data){
                    if(data == true){
                        alert("成功");
                    }
                    if(data == false){
                        alert("失败");
                    }
                });
        });
    }
</script>
</html>